<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@page import="iwpl.project.entities.Areas"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@page import="iwpl.project.dao.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'Insert_BuyingContract.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link rel="stylesheet" href="css/datepicker.css" type="text/css" />
		<script type="text/javascript" src="js/datepicker.js"></script>
<script src="js/jquery-Source.js"></script>
		<script type="text/javascript"
			src="js/jquery-Validation.js"></script>
		<script type="text/javascript">
  $(document).ready(function()
  {
    $("#commentForm").validate();
  });
  </script>
 
  </script>
  <script type="text/javascript">
  	function search(control)
  	{
  		document.form1.action="/DepartmentManage/Result_Areas.jsp?control="+control;
  		document.form1.submit();
  	}
  </script>
  </head>
  
  <body>
     			<table align="center" border="1px" cellpadding="0" cellspacing="0"
				style="width: 780px; border-color: #3399FF">
				<tr>
					<td colspan="2"><jsp:include page="Header.jsp"></jsp:include>
					</td>
				</tr>
				<tr>
					<td style="width: 245px" nowrap="nowrap" valign="top">&nbsp;<jsp:include page="Left.jsp"></jsp:include>
					</td>
					<td style="width: 75%" valign="top">

			
   					 <hr width="100%"/>
    					<form id="form1" name="form1" action="/DepartmentManage/servlet/Control_Contract" method="post">
   						<table>
   							<tr>
   								<td>Area :</td>
   								<td>
   									<%
   										AreasDAO dao=new AreasDAO();
   										List data= dao.findAll();
   										Iterator ir=data.listIterator();
   										Areas  ar=new Areas();
   										out.print("<select name=cboArea>");
   										while(ir.hasNext())
   										{
   											ar=(Areas)ir.next();
   											int id=ar.getId();
   											String name=ar.getAreaName();
   											out.print("<option value="+id+">"+name+"</option>");
   											
   										}
   										out.print("</select>");
   									 %>
   									
   								</td>
   								<td >
   									<center><input type="button" name="bntsearch" value="Next" onclick="javascript:search(cboArea.value)"/></center>
   								</td>
   							</tr>
   							
   						</table>
						</form>
					</td>
				</tr>
			</table>
  </body>
</html>
